import "./App.less";
import Login from "../view/Login/Login";
import Home from "../components/Home/Home";
import { HashRouter } from "react-router-dom";
import store from "../store/store";
import { observer } from "mobx-react";
function App() {
  let View = null;
  if (store.user||(sessionStorage.getItem("user") &&sessionStorage.getItem("token"))) {
    View = <Home />;
  } else {
    View = <Login />;
  }
  return (
    <HashRouter>
      <div className="App">{View}</div>
    </HashRouter>
  );
}

export default observer(App);
